cmake_minimum_required(VERSION 3.25)
project(ExampleCComputeUI C)

set(CMAKE_C_STANDARD 11)

find_package(PkgConfig REQUIRED)
PKG_CHECK_MODULES(GTK3 REQUIRED gtk+-3.0)

include_directories(${GTK3_INCLUDE_DIRS})
link_directories(${GTK3_LIBRARY_DIRS})

MESSAGE(STATUS "GTK3_INCLUDE_DIRS = ${GTK3_INCLUDE_DIRS}")
MESSAGE(STATUS "GTK3_LIBRARY_DIRS = ${GTK3_LIBRARY_DIRS}")
MESSAGE(STATUS "GTK3_CFLAGS_OTHER = ${GTK3_CFLAGS_OTHER}")

add_definitions(${GTK3_CFLAGS_OTHER})

add_executable(ExampleCComputeUI main.c)

target_link_libraries(ExampleCComputeUI ${GTK3_LIBRARIES})
MESSAGE(STATUS "GTK3_LIBRARIES = ${GTK3_LIBRARIES}")


# RPATH 相关的变量
MESSAGE(STATUS "LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}")
MESSAGE(STATUS "LD_RUN_PATH = ${LD_RUN_PATH}")
MESSAGE(STATUS "RUN_PATH = ${RUN_PATH}")
MESSAGE(STATUS "INSTALL_RPATH = ${INSTALL_RPATH}")
MESSAGE(STATUS "BUILD_RPATH = ${BUILD_RPATH}")
